package com.hduong.springcloud.service.impl;

import com.hduong.springcloud.dao.StorageDao;
import com.hduong.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <h3>spring-cloud-demo-parent</h3>
 * <p>StorageServiceImpl</p>
 *
 * @author : hduong
 * @version : 1.0
 * @date : 2020-03-23 10:05
 **/
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Autowired
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("---------------->storage-service扣减库存开始");
        storageDao.decrease(productId, count);
        log.info("---------------->storage-service扣减库存结束");
    }
}
